#ifndef SettingsBaseView_h
#define SettingsBaseView_h

#include <aknview.h>
#include <aknsettingitemlist.h>

#include "SettingsObserver.h"

class CSettingsListBox;
class CAknTextSettingPage;
class CAknIntegerSettingPage;
class CAknDurationSettingPage;
class CAknTimeSettingPage;
class CAknPopupSettingPage;
class CAknCheckBoxSettingPage;
class CSelectionItemList;
class CAknVolumeSettingPage;
class CTimeRangeSettingPage;

class CSettingsBaseView : public CAknView, public MSettingsObserver
{
public:
	CSettingsBaseView();
	virtual void DoActivateL(const TVwsViewId& aPrevViewId,TUid aCustomMessageId,const TDesC8& aCustomMessage);
	virtual void DoDeactivate();
	~CSettingsBaseView();
public:
	static CAknDurationSettingPage* CreateDurationSettingPageL(const TDesC& aTitle, TTimeIntervalSeconds& aValue, TInt aInd);
	static CAknIntegerSettingPage* CreateIntegerSettingPageL(const TDesC& aTitle, TInt& aValue, TInt aInd);
	static CAknTextSettingPage* CreateTextSettingPageL(const TDesC& aTitle, TDes& aText, TInt aInd);
	static CAknTimeSettingPage* CreateTimeSettingPageL(const TDesC& aTitle, TTime& aValue, TInt aInd);
	static CAknPopupSettingPage* CreatePopupSettingPageL(const TDesC& aTitle, TInt& aValue, TInt aArrResId, TInt aInd);
	TPtrC Title(TInt aInd);
public:
	void HandleCommandL(TInt aCommand);
protected:
	void ConstructL(const TRect& aRect);
	void CreateListBoxL();
	virtual void LoadIconsL();
	virtual void LoadItemsL() = 0;
	virtual void SelectedIndexChangedL(TInt aInd);
public:
	CSettingsListBox* iListBox;
	CDesCArray* iItems;
	TInt iLastInd;
};

#endif